import request from '@/common/request.js'
import { formatGetUri } from '@/common/util.js'

const api = {};
const ORDER = 'order';
const MYINCOME = 'my_income';

// 订单列表
api.orderlist = params => request.globalRequest(`${ORDER}/order_list`, 'POST', params, 1)
// 我的收益
api.myincomedata = params => request.globalRequest(`${ORDER}/myincome`, 'POST', params, 1)
// 我的收益查询
api.myincome_search = params => request.globalRequest(`${ORDER}/myincome_search`, 'POST', params, 1)
//上个月和上上个月的结算收益
api.get_month_up_money = params => request.globalRequest(`${ORDER}/get_month_up_money`, 'POST', params, 1)
//提现列表
api.income_logo = params => request.globalRequest(`${MYINCOME}/income_logo`, 'POST', params, 1)
//提现数据
api.withdraw_info = params => request.globalRequest(`${MYINCOME}/withdraw_info`, 'POST', params, 1)
//提现
api.apply_income = params => request.globalRequest(`${MYINCOME}/apply_income`, 'POST', params, 1)
// GET请求方式
//api.homeindex = params => request.globalRequest(`${PORT1}/index${formatGetUri(params)}`, 'GET',{}, 1)
export default api